//
//  HotViewcontroller.m
//  YSBEmployer
//
//  Created by developer on 2021/12/05.
//  Copyright © 2021 ysb. All rights reserved.
//

#import "YSBPermanentWorkerPositionDetailController.h"

@implementation YSBPermanentWorkerPositionDetailController

- (NSMutableDictionary *)setupPositionDetailParam{

    NSMutableDictionary * param = [[NSMutableDictionary alloc] initWithCapacity:0];
    NSInteger uid = [[[YSBUserData userData] userInfo] userId];
    [param setValue:[NSNumber numberWithInteger:uid] forKey:@"uid"];
    [param setValue:self.emplementTitle forKey:@"title"];
    [param setValue:[NSNumber numberWithInteger:self.selectedPositionID] forKey:@"tag_id"];
    [param setValue:[NSNumber numberWithInteger:self.interviewDateType] forKey:@"meet_date_type"];//meet_date_type （新版增加）    是    int    面试日期类型 0：周期 1：日期
    [param setValue:self.positonDetail forKey:@"info"];
    [param setValue:[NSNumber numberWithInteger:self.education] forKey:@"education"];
    [param setValue:[NSNumber numberWithInteger:self.gender] forKey:@"gender"];
    [param setValue:[NSNumber numberWithInteger:self.minAge] forKey:@"min_age"];
    [param setValue:[NSNumber numberWithInteger:self.maxAge] forKey:@"max_age"];
    [param setValue:[NSString stringWithFormat:@"%@-%@",self.minSalary ,self.maxSalary ] forKey:@"expect_salary"];
    [param setValue:[NSNumber numberWithInteger:[self.baseSalary integerValue]] forKey:@"base_salary"];

    [param setValue:self.locationName forKey:@"address"];
    [param setValue:self.locationDetailName forKey:@"address_info"];
    [param setValue:self.interviewDate forKey:@"meet_date"];
    [param setValue:self.interviewTimeQuantum forKey:@"meet_time"];
    [param setValue:self.receiverName forKey:@"receiver"];
    [param setValue:self.receiverPhone forKey:@"receiver_phone"];
    [param setValue:[self setupWelfireParam] forKey:@"welfare"]; //福利id组成的字串，用逗号隔开
    [param setValue:self.imageFileStr forKey:@"file"];//企业风采附件id,用逗号隔开,格式：”1,2,3”
    [param setValue:self.province forKey:@"province"];
    [param setValue:self.city forKey:@"city"];
    [param setValue:self.area forKey:@"area"];
    [param setValue:self.longitude forKey:@"lon"];
    [param setValue:self.latitude forKey:@"lat"];
    [param setValue:self.interviewCarry forKey:@"other_demand"];
    
    if (self.normalSalary.length > 0) {
        [param setValue:self.normalSalary forKey:@"hourly_salary"];
    }
    
    if (self.weekdaySalary.length > 0) {
        [param setValue:self.weekdaySalary forKey:@"weekend_hourly_salary"];
    }
    
    if (self.holidaySalary.length > 0) {
        [param setValue:self.holidaySalary forKey:@"holiday_hourly_salary"];
    }
    
    if (self.otherSalary.length > 0) {
        [param setValue:self.otherSalary forKey:@"other_salary"];
    }
    
    return param;
}


@end
